/**
 * 
 */
package com.lvan.service.interfaze.system;

import com.lvan.bean.User;
import com.lvan.bean.BaseException;
import com.lvan.service.interfaze.IService;

/**
 * @author lvan.he<br>
 * 2013-6-26<br>
 * @version 1.0.0.0 
 */
public interface IUserService extends IService<User>{
    public static final String USER_CONFIG = "WEB-INF/config/user.properties";
    public static final String LOCK_DATE = "auto.release.login.lock";
    
    
    public static final String LOGIN_FAIL = "登录失败";
    /**
	 * 无此用户
	 */
    public static final int NO_USER = 1;
    /**
	 * 密码错误
	 */
    public static final int PWD_ERROR = 2;
    /**
	 * 用户登录多次未成功锁定账号
	 */
    public static final int USER_LOCKED_BY_MULTI_ERROR_LOGIN = 3;
    /**
	 * 用户已被上锁
	 */
    public static final int USER_LOCKED = 4;
    /**
	 * 用户未定义
	 */
    public static final int USER_UNDEFINED = 5;
    /**
   	 * 用户名必填
   	 */
    public static final int USERNAME_REQUIRED = 6;
    public User login(User user,String ip) throws BaseException;
    public boolean hasUseByName(User user) throws BaseException;
    public void logout(User user) throws BaseException;
}
